package com.brtbeacon.demo.lot.fragment;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.brtbeacon.demo.lot.LotMapActivity;
import com.brtbeacon.demo.lot.R;
import com.brtbeacon.demo.lot.state.ParkingState;

/**
 * 车辆导航控制面板
 */
public class ParkingNavigateControlFragment extends ParkingBaseFragment {

    public TextView tvInfo;
    public TextView tvChange;
    public Button btnOK;

    public ParkingNavigateControlFragment() {
        // Required empty public constructor
    }

    public static ParkingNavigateControlFragment newInstance() {
        ParkingNavigateControlFragment fragment = new ParkingNavigateControlFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.bb_fragment_parking_navigate_control, container, false);
        tvInfo = rootView.findViewById(R.id.tv_info);
        tvChange = rootView.findViewById(R.id.tv_change);
        btnOK = rootView.findViewById(R.id.btn_ok);

        //tvChange.setOnClickListener(this);
        //btnOK.setOnClickListener(this);
        return rootView;
    }

    /*
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_ok: {
                //  TODO... 设置停车点；
                LotMapActivity activity = (LotMapActivity) getActivity();
                activity.setState(ParkingState.PARKING_STATE_ROUTE);
                break;
            }

            case R.id.tv_change: {
                LotMapActivity activity = (LotMapActivity) getActivity();
                activity.setState(ParkingState.PARKING_STATE_TARGET);
                break;
            }
        }
    }
    */
}
